<?php
class AlbumController extends Zend_Controller_Action
{
	static function listerimagebyidAction($vip){
    	$photo=new Table_Photos();
    	return $photo->getAdressePremierePhotoByNumVip($vip->VIP_NUMERO);   	
    }
    
    static function getvipdetailAction($numvip){
    	$vip = new Table_Vips();
    	return $vip->getOneVip($numvip);
    }
    
    public function getnumpageAction(){
    	return ($this->_request->getParam("numpage")==null)?1:($this->_request->getParam("numpage"));
    }
    
    public function getnumvipdetailAction(){
    	return ($this->_request->getParam("numvipdetail")==null)?0:($this->_request->getParam("numvipdetail"));
    }
    
	public function listeralbumAction()
	    {
	    	$nbPhotos = 12;
	    	$lettres = new Table_Vips();
	    	$numpage = $this->getnumpageAction();
	    	$list=$lettres->getAllVipsByPage($numpage, $nbPhotos);
	    	$numvipdet = $this->getnumvipdetailAction();
	    	$this->view->listeralbum=array('numpageact'=>$numpage, 'list' =>$list, 'numvipdetail' =>$numvipdet);    	 	 
	    }
}
?>